{include file="public/header"}
<title>需求列表</title>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 意见管理
    <span class="c-gray en">&gt;</span> 意见列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">

    <div class="mt-20">
        <div class="title-border">
            <div class="flex1">序号</div>
            <div class="flex2">用户姓名</div>
            <div class="flex3">意见</div>
            <div class="flex2">提交时间</div>
            <div class="flex2">处理人</div>
            <div class="flex1">状态</div>
            <div class="flex2">处理结果</div>
            <div class="flex2">处理时间</div>
            <div class="flex3">操作</div>
        </div>
        {volist name='data' id='vo'}
        <div class="content-border">
            <div class="flex1">{$vo.opinion_id}</div>
            <div class="flex2">{$vo.customer}</div>
            <div class="flex3">{$vo.proposal}</div>
            <div class="flex2">{:date('Y-m-d H:i:s',$vo.create_time)}</div>
            <div class="flex2">{$vo.admin}</div>
            <div class="flex1" style="color: red">{$vo.states}</div>
            <div class="flex2">{$vo.huifu}</div>
            <div class="flex2"><?php if($vo['last_time']){ echo date('Y-m-d H:i:s',$vo['last_time']); }?></div>
            <?php if($vo['state']==0){?>
            <div class="td-manage flex3">
                <a class="ch-button ch-blue edit" data-id="{$vo.opinion_id}" href="javascript:;" title="编辑">处理</a>
            </div>
            <?php }else{?>
            <div class="td-manage flex3">
                <a class="ch-button ch-blue" data-id="{$vo.opinion_id}" href="javascript:;" title="编辑">已处理</a>
            </div>
            <?php }?>
        </div>
        {/volist}
        <div class="pages" style="float: right">{$data->render()}</div>

    </div>
</div>

{include file="public/footer"}
<script type="text/javascript">
    $('.edit').click(function () {
        var winWidth = $(window).width();
        var areaWidth = "";
        var areaHeight = "";
        if( winWidth > 768 ){
            areaWidth = "400px"
            areaHeight = "400px"
        } else {
            areaWidth = '100%'
            areaHeight = '100%'
        }
        var id=$(this).attr('data-id');
        var src="{:Url('index/Opinion/edit')}";
        layer.open({
            type: 2,
            area: [areaWidth, areaHeight],
            fix: false,
            maxmin: true,
            shade:0.4,
            title: '处理意见',
            content: src+'?opinion_id='+id
        });
    });


</script>
</body>
</html>